#include "../include/FireworkCircle.h"

#include <algorithm>
#include <iterator>

#include "../include/utilities.h"

void FireworkCircle::initFireworkParticles() {
	
	std::normal_distribution<float> speedDis(10, 1);
	std::uniform_real_distribution<float> radiusDis(-20, 20);
	std::uniform_int_distribution pointCountDis(-20, 20);
	
	float radius = 100 + radiusDis(m_gen);
	Vector3 normal = getRandomNormal(-90, 90, 0, 360);
	float initSpeed = fabsf(10 + speedDis(m_gen));
	float lengthBomb = 1;
	std::vector<Vector3> circlePointPos = getNormalCirclePos(m_pos, radius, normal, 0, 360, 30 + pointCountDis(m_gen));
	std::vector<Vector3> speedList = getSpeedlistFromPoslist(m_pos, initSpeed, circlePointPos);
	Color color = getRandomColor();
	addNewBombs(m_pos, speedList, color, lengthBomb);
}
